
package com.example.yls.compturewuziqi;

import android.content.Intent;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class StartActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.setContentView(R.layout.activity_start);
        Handler handler = new Handler();
        handler.postDelayed(new Loading(), 2000);
    }
    private class Loading implements Runnable {
        public void run() {
            Intent intent = new Intent();
            intent.setClass(StartActivity.this, MainActivity.class);
            startActivity(intent);
            StartActivity.this.finish();
        }
    }
}
